package com.student.education.service;

import com.student.education.common.CommonPage;
import com.student.education.entity.Consumption;
import com.student.education.to.ConsumptionCountTo;
import com.student.education.to.ConsumptionQueryTo;
import com.student.education.to.ConsumptionTo;
import com.student.education.vo.ConsumptionVo;

import java.util.List;

/**
 * 消费信息表(Consumption)表服务接口
 *
 * @author makejava
 * @since 2021-10-06 21:56:55
 */
public interface ConsumptionService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    Consumption queryById(Integer id);


    /**
     * 新增数据
     *
     * @param list 实例对象
     * @return 实例对象
     */
    int insert(List<ConsumptionTo> list);

    /**
     * 修改数据
     *
     * @param consumption 实例对象
     * @return 实例对象
     */
    Consumption update(Consumption consumption);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

    CommonPage<ConsumptionQueryTo> query(ConsumptionVo consumption);

    ConsumptionCountTo count(Integer useId);
}
